{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 268,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow as tf\n",
    "\n",
    "gpus = tf.config.list_physical_devices(\"GPU\")\n",
    "\n",
    "if gpus:\n",
    "    tf.config.experimental.set_memory_growth(gpus[0], True)  #设置GPU显存用量按需使用\n",
    "    tf.config.set_visible_devices([gpus[0]],\"GPU\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas            as pd\n",
    "import tensorflow        as tf  \n",
    "import numpy             as np\n",
    "import matplotlib.pyplot as plt\n",
    "# 支持中文\n",
    "plt.rcParams['font.sans-serif'] = ['SimHei']  # 用来正常显示中文标签\n",
    "plt.rcParams['axes.unicode_minus'] = False  # 用来正常显示负号\n",
    "\n",
    "from numpy                 import array\n",
    "from sklearn               import metrics\n",
    "from sklearn.preprocessing import MinMaxScaler\n",
    "from keras.models          import Sequential\n",
    "from keras.layers          import Dense,LSTM,Bidirectional\n",
    "\n",
    "\n",
    "# 确保结果尽可能重现\n",
    "from numpy.random          import seed\n",
    "seed(1)\n",
    "tf.random.set_seed(1)\n",
    "\n",
    "# 设置相关参数\n",
    "n_timestamp  = 5    # 时间戳\n",
    "n_epochs     = 30    # 训练轮数\n",
    "# ====================================\n",
    "#      选择模型：\n",
    "#            1: 单层 LSTM\n",
    "#            2: 多层 LSTM\n",
    "#            3: 双向 LSTM\n",
    "# ====================================\n",
    "model_type = 1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 270,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    year    CPI\n",
      "0   1985  109.3\n",
      "1   1986  106.5\n",
      "2   1987  107.3\n",
      "3   1988  118.8\n",
      "4   1989  118.0\n",
      "5   1990  103.1\n",
      "6   1991  103.4\n",
      "7   1992  106.4\n",
      "8   1993  114.7\n",
      "9   1994  124.1\n",
      "10  1995  117.1\n",
      "11  1996  108.3\n",
      "12  1997  102.8\n",
      "13  1998   99.2\n",
      "14  1999   98.6\n",
      "15  2000  100.4\n",
      "16  2001  100.7\n",
      "17  2002   99.2\n",
      "18  2003  101.2\n",
      "19  2004  103.9\n",
      "20  2005  101.8\n",
      "21  2006  101.5\n",
      "22  2007  104.8\n",
      "23  2008  105.9\n",
      "24  2009   99.3\n",
      "25  2010  103.3\n",
      "26  2011  105.4\n",
      "27  2012  102.6\n",
      "28  2013  102.6\n",
      "29  2014  102.0\n",
      "30  2015  101.4\n",
      "31  2016  102.0\n",
      "32  2017  101.6\n",
      "33  2018  102.1\n",
      "34  2019  102.9\n",
      "35  2020  102.5\n"
     ]
    }
   ],
   "source": [
    "data = pd.read_csv('./datasets/CPI指数.csv')  # 读取股票文件\n",
    "print(data)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 271,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1985]\n",
      " [1986]\n",
      " [1987]\n",
      " [1988]\n",
      " [1989]]\n",
      "[[109.3]\n",
      " [106.5]\n",
      " [107.3]\n",
      " [118.8]\n",
      " [118. ]]\n",
      "[[2011]\n",
      " [2012]\n",
      " [2013]\n",
      " [2014]\n",
      " [2015]]\n",
      "[[105.4]\n",
      " [102.6]\n",
      " [102.6]\n",
      " [102. ]\n",
      " [101.4]]\n"
     ]
    }
   ],
   "source": [
    "\"\"\"\n",
    "前(35-10=25)天的开盘价作为训练集,10\n",
    "\"\"\"\n",
    "training_count = 25\n",
    "training_set_x = data.iloc[0:training_count, 0:1].values  \n",
    "training_set_y = data.iloc[0:training_count, 1:2].values  \n",
    "test_set_x     = data.iloc[training_count+1:, 0:1].values\n",
    "test_set_y     = data.iloc[training_count+1:, 1:2].values\n",
    "\n",
    "print(training_set_x[0:5])\n",
    "print(training_set_y[0:5])\n",
    "print(test_set_x[0:5])\n",
    "print(test_set_y[0:5])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 272,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[0.        ]\n",
      " [0.04166667]\n",
      " [0.08333333]\n",
      " [0.125     ]\n",
      " [0.16666667]\n",
      " [0.20833333]\n",
      " [0.25      ]\n",
      " [0.29166667]\n",
      " [0.33333333]\n",
      " [0.375     ]\n",
      " [0.41666667]\n",
      " [0.45833333]\n",
      " [0.5       ]\n",
      " [0.54166667]\n",
      " [0.58333333]\n",
      " [0.625     ]\n",
      " [0.66666667]\n",
      " [0.70833333]\n",
      " [0.75      ]\n",
      " [0.79166667]\n",
      " [0.83333333]\n",
      " [0.875     ]\n",
      " [0.91666667]\n",
      " [0.95833333]\n",
      " [1.        ]]\n"
     ]
    }
   ],
   "source": [
    "#将数据归一化，范围是0到1\n",
    "sc  = MinMaxScaler(feature_range=(0, 1))\n",
    "training_set_scaled_x = sc.fit_transform(training_set_x)\n",
    "training_set_scaled_y = sc.fit_transform(training_set_y)\n",
    "testing_set_scaled_x  = sc.transform(test_set_x) \n",
    "testing_set_scaled_y  = sc.transform(test_set_y)\n",
    "print(training_set_scaled_x)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 273,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(20, 1) (5, 1)\n"
     ]
    }
   ],
   "source": [
    "# 取前 n_timestamp 天的数据为 X；n_timestamp+1天数据为 Y。\n",
    "def data_split(sequence_x, sequence_y, n_timestamp):\n",
    "    X = []\n",
    "    y = []\n",
    "    for i in range(len(sequence_y)):\n",
    "        end_ix = i + n_timestamp\n",
    "        \n",
    "        if end_ix > len(sequence_y)-1:\n",
    "            break\n",
    "            \n",
    "        seq_x, seq_y = sequence_x[i:end_ix], sequence_y[end_ix]\n",
    "        X.append(seq_x)\n",
    "        y.append(seq_y)\n",
    "    return array(X), array(y)\n",
    "\n",
    "X_train, y_train = data_split(training_set_x,training_set_scaled_y, n_timestamp)\n",
    "X_train          = X_train.reshape(X_train.shape[0], X_train.shape[1], 1)\n",
    "\n",
    "X_test, y_test   = data_split(test_set_x, testing_set_scaled_y, n_timestamp)\n",
    "X_test           = X_test.reshape(X_test.shape[0], X_test.shape[1], 1)\n",
    "\n",
    "print(y_train.shape, y_test.shape)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 274,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"sequential_22\"\n",
      "_________________________________________________________________\n",
      " Layer (type)                Output Shape              Param #   \n",
      "=================================================================\n",
      " lstm_22 (LSTM)              (None, 10)                480       \n",
      "                                                                 \n",
      " dense_22 (Dense)            (None, 1)                 11        \n",
      "                                                                 \n",
      "=================================================================\n",
      "Total params: 491\n",
      "Trainable params: 491\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "# 建构 LSTM模型\n",
    "if model_type == 1:\n",
    "    # 单层 LSTM\n",
    "    model = Sequential()\n",
    "    # model.add(LSTM(units=100, activation='relu',\n",
    "    #                input_shape=(X_train.shape[1], 1)))\n",
    "    model.add(LSTM(units=10, activation='relu',\n",
    "                   input_shape=(X_train.shape[1], 1)))\n",
    "    model.add(Dense(units=1))\n",
    "\n",
    "if model_type == 2:\n",
    "    # 多层 LSTM\n",
    "    model = Sequential()\n",
    "    model.add(LSTM(units=50, activation='relu', return_sequences=True,\n",
    "                   input_shape=(X_train.shape[1], 1)))\n",
    "    model.add(LSTM(units=50, activation='relu'))\n",
    "    model.add(Dense(1))\n",
    "if model_type == 3:\n",
    "    # 双向 LSTM\n",
    "    model = Sequential()\n",
    "    model.add(Bidirectional(LSTM(50, activation='relu'),\n",
    "                            input_shape=(X_train.shape[1], 1)))\n",
    "    model.add(Dense(1))\n",
    "    \n",
    "model.summary() # 输出模型结构\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 275,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 该应用只观测loss数值，不观测准确率，所以删去metrics选项，一会在每个epoch迭代显示时只显示loss值\n",
    "model.compile(optimizer=tf.keras.optimizers.Adam(0.001),\n",
    "              loss='mean_squared_error')  # 损失函数用均方误差\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 276,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/30\n",
      "4/4 [==============================] - 2s 117ms/step - loss: 7696.0728 - val_loss: 6584.9375\n",
      "Epoch 2/30\n",
      "4/4 [==============================] - 0s 16ms/step - loss: 5849.5898 - val_loss: 4948.6655\n",
      "Epoch 3/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 4372.0386 - val_loss: 3656.7610\n",
      "Epoch 4/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 3208.9500 - val_loss: 2604.7642\n",
      "Epoch 5/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 1019.9846 - val_loss: 54.2215\n",
      "Epoch 6/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 69.0480 - val_loss: 100.4962\n",
      "Epoch 7/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 110.5619 - val_loss: 135.3929\n",
      "Epoch 8/30\n",
      "4/4 [==============================] - 0s 10ms/step - loss: 138.5979 - val_loss: 153.7270\n",
      "Epoch 9/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 150.4722 - val_loss: 156.2914\n",
      "Epoch 10/30\n",
      "4/4 [==============================] - 0s 13ms/step - loss: 148.2546 - val_loss: 146.7502\n",
      "Epoch 11/30\n",
      "4/4 [==============================] - 0s 13ms/step - loss: 135.8075 - val_loss: 129.5373\n",
      "Epoch 12/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 117.4639 - val_loss: 108.5857\n",
      "Epoch 13/30\n",
      "4/4 [==============================] - 0s 13ms/step - loss: 96.6374 - val_loss: 87.0437\n",
      "Epoch 14/30\n",
      "4/4 [==============================] - 0s 15ms/step - loss: 76.1368 - val_loss: 66.9681\n",
      "Epoch 15/30\n",
      "4/4 [==============================] - 0s 14ms/step - loss: 57.5555 - val_loss: 49.5618\n",
      "Epoch 16/30\n",
      "4/4 [==============================] - 0s 22ms/step - loss: 41.9020 - val_loss: 35.2829\n",
      "Epoch 17/30\n",
      "4/4 [==============================] - 0s 21ms/step - loss: 29.3141 - val_loss: 24.1489\n",
      "Epoch 18/30\n",
      "4/4 [==============================] - 0s 16ms/step - loss: 19.6477 - val_loss: 15.8691\n",
      "Epoch 19/30\n",
      "4/4 [==============================] - 0s 14ms/step - loss: 12.5655 - val_loss: 9.9871\n",
      "Epoch 20/30\n",
      "4/4 [==============================] - 0s 14ms/step - loss: 7.7165 - val_loss: 5.9769\n",
      "Epoch 21/30\n",
      "4/4 [==============================] - 0s 15ms/step - loss: 4.4406 - val_loss: 3.3828\n",
      "Epoch 22/30\n",
      "4/4 [==============================] - 0s 14ms/step - loss: 2.4120 - val_loss: 1.7867\n",
      "Epoch 23/30\n",
      "4/4 [==============================] - 0s 15ms/step - loss: 1.1914 - val_loss: 0.8673\n",
      "Epoch 24/30\n",
      "4/4 [==============================] - 0s 15ms/step - loss: 0.5583 - val_loss: 0.3727\n",
      "Epoch 25/30\n",
      "4/4 [==============================] - 0s 13ms/step - loss: 0.2365 - val_loss: 0.1339\n",
      "Epoch 26/30\n",
      "4/4 [==============================] - 0s 15ms/step - loss: 0.1022 - val_loss: 0.0350\n",
      "Epoch 27/30\n",
      "4/4 [==============================] - 0s 14ms/step - loss: 0.0663 - val_loss: 0.0040\n",
      "Epoch 28/30\n",
      "4/4 [==============================] - 0s 12ms/step - loss: 0.0675 - val_loss: 6.5398e-04\n",
      "Epoch 29/30\n",
      "4/4 [==============================] - 0s 18ms/step - loss: 0.0848 - val_loss: 0.0046\n",
      "Epoch 30/30\n",
      "4/4 [==============================] - 0s 11ms/step - loss: 0.0953 - val_loss: 0.0074\n",
      "Model: \"sequential_22\"\n",
      "_________________________________________________________________\n",
      " Layer (type)                Output Shape              Param #   \n",
      "=================================================================\n",
      " lstm_22 (LSTM)              (None, 10)                480       \n",
      "                                                                 \n",
      " dense_22 (Dense)            (None, 1)                 11        \n",
      "                                                                 \n",
      "=================================================================\n",
      "Total params: 491\n",
      "Trainable params: 491\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "history = model.fit(X_train, y_train, \n",
    "                    batch_size=5, \n",
    "                    epochs=n_epochs, \n",
    "                    validation_data=(X_test, y_test), \n",
    "                    validation_freq=1)                  #测试的epoch间隔数\n",
    "\n",
    "model.summary()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 277,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEFCAYAAAAPCDf9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAscElEQVR4nO3deZxcZZno8d9TW+9b0pWlk3QSoDv7agsJQmwYdoNorly4Igw4ijMuM965zlx0FBlnlPFex+so4zhhWNyGEUdE1AGCQEjQRE1C2EIgwexrJ+mk03t11XP/OKc7vVR3n+ru6tqe7+dTVJ3nnDr1vnXCU6efc857RFUxxhiTG3ypboAxxpjxY0nfGGNyiCV9Y4zJIZb0jTEmh1jSN8aYHGJJ3xhjcogl/SwlIp8RkaMi0iYiZ9zXl41yfZ9J1vLjRUTWi0j9EPMfEZG/6jX9MRH5Lw/rvV1EHo4Tv0lE/mmI9z0sIrcPt/4h3j/k+kex3ttF5D/Ger0m9QKpboBJDlX9GvA1NxFtVtXvjMH6krZ8GnkWeC/wf93pS9zYiKjqj4AfjbZRIvJp4GFVPZ2M9ZvcYXv6xvT1LHCJiIg7fSmjSPpj6NNAeYrbYLKAJf0c5JY4PiAij4vIc73ifyoi+0XkkIj8737vuUdE7uk1Xe+u5x9F5ISIbBCRgpEsLyI3i8hBEdkmI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I/G0Ur08JbaO0T/qq2tRvHP7/BL4oItcD1wDPAi8CM4E/B97AuR/v74ErVPVCIAhcN64NH4LHPsWL9b/n8PjdTXkIo+hP2m4jABFZCVTg7ET0/97jbYu03D69jaBPGbuN4vy7hAzfRoP0KaFtlPZJvz9V/XvgSeAjwHdVtRn4IvCnqvolYCdwB/CKqh5x37YFSKc/4/qI16dB+pkR9xxOoD9pu41EZALwLeDDxP/evcbSxgj7lMnbKJ5M30bxJLSN0qrDCdgOVANfd6crgEUi4gcuAhT4vogscWPvA15OQTsTsZ2+fYoXy6R7Dm9n+P6k5TYSkRDwY+CzqrqP+N+711haGEWfMnkbxZPp2yiexLaRqmbEA1jf6/XfArf2mr4QeB3nl/EZnF/FhcArwKvAl1Pd/kT7NEg/S90N+nWcMlZZqvswyv6k5TYC/gxoBNa7jz/u/73H2xbpvH1G0aeM3UaD/LvM6G00SJ8S2kZ2RW6GcY/eXwlsUNWjqW5Proj3vXuNpatMb39/XtueSX1MRlst6RtjTA7J1Jq+McaYEbCkb4wxOcSSvjHG5BBL+sYYk0Ms6RtjTA75/5Lo68Dfb/SwAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x_len = len(history.history['loss'])\n",
    "x_loss = data.iloc[0:x_len,0:1]\n",
    "\n",
    "plt.plot(x_loss, history.history['loss'], label='Training Loss')\n",
    "plt.plot(x_loss, history.history['val_loss'], label='Validation Loss')\n",
    "plt.title('Training and Validation Loss')\n",
    "plt.legend()\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 278,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAERCAYAAACO6FuTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm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TjwRnnoqJIx774UGDeCPfwztGMccE+JavTq9cdUQShIiknw//RS+hI89NrQLzJwZRlFnuopnl13g978PXWbnzIFrroGPPoI+fUJ1VP/+oRvuhg2ZjbMaUZIQkeT63/+gc+dQnXPRRfDmm1Ad26D23htuvDHEm58Pp50GTz4JRx4ZutAOHhwSSS2nJCEiyfP446HO/+OPwxfufffB9tuXfV4mbbPN5i6zixaFqqf99gtjMfbdFw47LHyOpUszHWlGKEmk2HXXXUebNm3o0qULv/nNb/iykg1l1113Hfn5+Zu2L7/88jLPmTVrFrMqMA1JyWuU9Oc//5nDDz+ck046iVWrVpX62fbaa69yX1eywOrVcP75cPrpsP/+YezDySdnOqqK22GH0GV2wgRYsCA8Da1eHcZ0NG8OvXqFRvCffsp0pGmjJJEG1157LVOmTOHcc89l6NChSSnz7nKMHq9okijN1KlTKSgo4I033qB79+4MGzYMSM1nkxrm3XdDb6Xhw0Md/2uvhW6uNV3z5nDllWEqkFmz4NJLQwN8r17hvYsvDlVpWTSMIJFaNS1HBuf3A8JEe9tHj955eXkccsghzJ49m4kTJ7J69WrOPvtsvv76aw444ADuvfdeli9fzqmnnsr69etx9y2mDM/Ly9v0W/+aNWvo168fCxYsYOedd2bs2LHceOONPP300wCMGjWKl19+ucLXKG7ixIn06NEDM+Poo4/m/fffZ+bMmQk/m9QS7jBsWPiP1agRTJoUpvfORu3awZ13hrEekyeHyQYfeihUQ+299+bpQLIhOZagJ4k0GDJkCF26dGHatGn83//9HwDTpk2jY8eOTJw4EYBhw4bRtm1bpkyZwldffcXs2bMZNmwYxx13HK+++ir16tWLLX/YsGG0a9eO119/nZNPPpn33nuPW265hYEDBzJw4EBefvnlKl+j+CSCrVq1omfPnrGfTWqBb78NDb0XXhjq8995J3sTRHF164YeW6NHh/aL4cPDU8XgwWHtiyOPDFOErFyZ6UiTplY9SWRofj+uvfZazjrrrC32tW3bll69em3anjNnDlOnTiU/P59vv/2WhQsX8vnnn9O7d28AcnMTDoYE4KOPPuLkqP63X79+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/inQKnqdS/xEgZWavjwNcY0ys3ZmVgc4EXgnxXEBdAbe9NIH26T7fpU3rnTfr8bAAdH1DiXMhJxIuu9XeePKxL+vWUAL4K5SjsnEv6/yxJWy+5XgGCoQf8Xvl7tn1Q9wEbCc8FtkPnBO9Bd0F+FxulGxY/OLvd4xuvFTgELg58B+wE0lyt8prrwMx9UWmA28CwxJ9f2Ktm8GehXbzvj9qkBcab1fQAfgfcJvcpMJv8Vl/H5VIK5M/Pu6HuhbDf99lSeulN2vBMf0TnQfknW/asWIa6vAdOPpLC/ZcSWL7lfF6H5VjO5XxZQ3rmQft+n42pAkRESkcrKuTUJERJJHSUJERGIpSYiISCwlCZEqMrNLLMzP80P050nR/rszHJpIlanhWiRJzOxTd98r03GIJFO55hMRkYozs3wPEw1iZjMJc+z8BDQDHgaeBh4h9Gl/1t1vyUykIvFU3SSSHjsApxJmBz2TMLp5EPC4ux8OnGhmu2QwPpGElCRE0mOxh3l+5hFmFzVgH+AiM8snTLy2W+bCE0lM1U0imTMH+K+7v2pmZxE/A6tIxuhJQiRzbgWuMrM3CNNOL85wPCJbUe8mERGJpScJERGJpSQhIiKxlCRERCSWkoSIiMRSkhARkVhKEiIiEuv/AWsrOtgClN0jAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(20, 5, 1) (5, 5, 1)\n"
     ]
    }
   ],
   "source": [
    "predicted_cpi = model.predict(X_test)                        # 测试集输入模型进行预测\n",
    "\n",
    "predicted_cpi = sc.inverse_transform(predicted_cpi)  # 对预测数据还原---从（0，1）反归一化到原始范围\n",
    "\n",
    "real_cpi      = sc.inverse_transform(y_test)# 对真实数据还原---从（0，1）反归一化到原始范围\n",
    "#real_cpi = y_test\n",
    "\n",
    "#print(X_test.shape, X_test)\n",
    "x_pre_len = len(predicted_cpi)\n",
    "x_pre = data.iloc[-x_pre_len:,0:1]\n",
    "x_pre = x_pre['year'].values\n",
    "# 画出真实数据和预测数据的对比曲线\n",
    "plt.plot(x_pre, real_cpi, color='red', label='Real CPI')\n",
    "plt.plot(x_pre, predicted_cpi, color='blue', label='Predicted CPI')\n",
    "plt.title('CPI Prediction')\n",
    "plt.xlabel('Time')\n",
    "plt.ylabel('CPI')\n",
    "plt.legend()\n",
    "plt.show()\n",
    "\n",
    "print(X_train.shape, X_test.shape)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 279,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "均方误差: 4.82160\n",
      "均方根误差: 2.19581\n",
      "平均绝对误差: 2.15047\n",
      "R2: -7502169.87296\n"
     ]
    }
   ],
   "source": [
    "\"\"\"\n",
    "MSE  ：均方误差    ----->  预测值减真实值求平方后求均值\n",
    "RMSE ：均方根误差  ----->  对均方误差开方\n",
    "MAE  ：平均绝对误差----->  预测值减真实值求绝对值后求均值\n",
    "R2   ：决定系数，可以简单理解为反映模型拟合优度的重要的统计量\n",
    "\n",
    "详细介绍可以参考文章：https://blog.csdn.net/qq_38251616/article/details/107997435\n",
    "\"\"\"\n",
    "MSE   = metrics.mean_squared_error(predicted_cpi, real_cpi)\n",
    "RMSE  = metrics.mean_squared_error(predicted_cpi, real_cpi)**0.5\n",
    "MAE   = metrics.mean_absolute_error(predicted_cpi, real_cpi)\n",
    "R2    = metrics.r2_score(predicted_cpi, real_cpi)\n",
    "\n",
    "print('均方误差: %.5f' % MSE)\n",
    "print('均方根误差: %.5f' % RMSE)\n",
    "print('平均绝对误差: %.5f' % MAE)\n",
    "print('R2: %.5f' % R2)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 280,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:Model was constructed with shape (None, 5, 1) for input KerasTensor(type_spec=TensorSpec(shape=(None, 5, 1), dtype=tf.float32, name='lstm_22_input'), name='lstm_22_input', description=\"created by layer 'lstm_22_input'\"), but it was called on an input with incompatible shape (None, 1, 1).\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:Model was constructed with shape (None, 5, 1) for input KerasTensor(type_spec=TensorSpec(shape=(None, 5, 1), dtype=tf.float32, name='lstm_22_input'), name='lstm_22_input', description=\"created by layer 'lstm_22_input'\"), but it was called on an input with incompatible shape (None, 1, 1).\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAERCAYAAABsNEDqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAArG0lEQVR4nO3dfZyVc/7H8denuy0VKqPWTUurpfviiKh2otytlKxyVxtWyLKxrGy52eRmk7SLaOjnLosWaRNbiZpQmNyUimV3yxYRIrnZpf38/vhe2dkxZ6Yzc85c55x5Px+P83Cd63yv63y+TebT9/rembsjIiKyverEHYCIiOQWJQ4REUmJEoeIiKREiUNERFKixCEiIilR4hARkZQocUjeMrN+ZvYPM3vHzM6Lzg03sy/N7H0ze9fMflPmmrvN7JztuHeF96lGzAvNrLDU+4vN7OI03Dct9xEBqBd3ACKZYGbNgOlAf+AN4BUzWxB9PMvdTzKzXYDnzGyhuz9fha9J132ScveJqZQ3s6vc/arq3kekImpxSL4aALzk7i+6+2ZgPtCndAF3/xB4HOhVnS9K133S5Mq4A5D8p8Qh+aoj8Gap99cCfy6nnAH/ScP3fXuf6HHTT83sMTN7+tsCZseY2RvR462rSp2/wszeM7MngR3/56ZmV5UuG5071cz+Hl1zSXTud2a2ITreYGYrt+M+p0WP8taY2fDo3HAzuz96fWRmj5iZVfcPR/KLHlVJvtoZWL/tjbu/A1D6d6CZ7QEcBwypzhcluc+1wMXAoqhMAXAzodWzCVhqZrOA+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ZZzpV4+eMmR0GfE74HzMnVLW+ZlYfuAN4wswGuPusmog3HarxM24KdDSznYE9gX9mPNg02c463wVgZr0JrY5xwHjS8PurNrc4ADCzHkAzwl+a9dHpj4GWZcu4+1KgcbJyuaIKdU56LlekWufo8c3lwOiajjUdqvAzHgasAiYA3c3s/JqNuPqqUOdngR8AFwCro7I5pbI6m5kBQ4BNwNek6fdXrU4cZtYcuBk4A9jCfx9JNCH6sylThmTlckUV61zuuVxRxTqPBqa4+yc1GmwaVLG+3YAid98ATAf61GTM1VXFOl8JnOPu44A3gNNrMubq2p46e3AesBw4Llm5VOXUL710iv5F+SfgMndfCywjNNsAugBryilDeeVqLOhqqmqdk/w55IRq/Jz7AueZ2UKgq5ndWbORV0016vs20CY6TlD1hUFrXDXq3AzoZGZ1gYOAnJnUtp11vtTMhkXndgY+Ka9clQJw91r5As4lNN8WRq+fAa8BkwjN1p3KKTME2LFsubjrUgN1/s65uOuS6TqXucfCuOtRAz/jpoRfRMXAEmD3uOtSA3XuDqwk/Ct8PtAk7rqkuc7NonoVA1MAS9fvL80cLyUavtYPKPbQZK9WuVyQT3XZXrWtzrWtvqA6Z/r3lxKHiIikpNb2cYiISNUocYiISEqUOEREJCVKHCIZYGa/MLOFZvZl9N/jo/OTYw5NpNrUOS6SQWb2trvvE3ccIulUa9eqEomDmS1098LoeBlhzaR/A62Au4CZwN2Ecfiz3f26eCIVSU6PqkTiswNwImEV01MIs5cvAx5y90OAgWbWIsb4RMqlxCESn/fdfQtheY+thJm9+wLnRkudNAZ2iy88kfLpUZVIdnkTmOXuz5jZaeTgiq2S/9TiEMku1wMXm9lzhM2G3o85HpHv0KgqERFJiVocIiKSEiUOERFJiRKHiIikRIlDRERSosQhIiIpUeIQEZGU/D9eDjsngq6tYQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X_pre = np.array(list(range(2020, 2031)))\n",
    "X_pre = X_pre.reshape(X_pre.shape[0],1)\n",
    "#print(X_pre,X_pre.shape)\n",
    "predicted = model.predict(X_pre)                        # 测试集输入模型进行预测\n",
    "\n",
    "#predicted = sc.inverse_transform(predicted)  # 对预测数据还原---从（0，1）反归一化到原始范围\n",
    "#print(predicted)\n",
    "plt.plot(X_pre, predicted, color='blue', label='Predicted CPI')\n",
    "plt.title('CPI Prediction')\n",
    "plt.xlabel('Time')\n",
    "plt.ylabel('CPI')\n",
    "plt.legend()\n",
    "plt.show()\n"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "a8f61be024eba58adef938c9aa1e29e02cb3dece83a5348b1a2dafd16a070453"
  },
  "kernelspec": {
   "display_name": "Python 3.9.7 64-bit ('base': conda)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
